#ifndef FIND_NODE_BY_NAME_VISITOR
#define FIND_NODE_BY_NAME_VISITOR 1

#include <vector>
#include <string>
#include <Define.h>
#include <osg/NodeVisitor>
#include <osgViewer/Viewer>
class OSG_EDITOR_DLL FindNodeByNameVisitor : public osg::NodeVisitor
{
public:
    FindNodeByNameVisitor();
	
    virtual ~FindNodeByNameVisitor();

	virtual void apply(osg::Node& node);
    void setNodeName(const std::string& node_name);

	osg::ref_ptr<osg::Node> getFindedNode();
private:
    std::string _node_name;
	osg::ref_ptr<osg::Node> _finded_node;
};

#endif //!FIND_NODE_BY_NAME_VISITOR
